<!DOCTYPE html>
<html lang="en">
<head>
    <title>{:config('site_title')}</title>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="description" content="">
    {include file="common:common_css" /}
    <style type="text/css">
        .weui-input{color: #000000;}
    </style>
</head>
<body ontouchstart>
<div class="page-group">
    <header class="bar bar-nav">
        <a class="button button-link button-nav pull-left" onclick="goBack('{:url('Index/index')}');"><span class="icon fa fa-angle-left"></span>返回</a>
        <h1 class="title">客户 - 详情</h1>
        <a class="button button-link button-nav pull-right" href="{:letu_url('edit',array('id'=>think_encrypt($model['customer_id'])))}"><span class="icon fa fa-edit"></span></a>
    </header>
    <div class="content letu-form">
        <form id="frmSubmit">
            <div class="weui-cells weui-cells_form letu-cells_not_top_line">
                <div class="weui-cell">
                    <div class="weui-cell__hd"><label class="weui-label">客户名称：</label></div>
                    <div class="weui-cell__bd">
                        <p>{$model.customer_name}</p>
                    </div>
                </div>
                <div class="weui-cell">
                    <div class="weui-cell__hd"><label class="weui-label">手机号1：</label></div>
                    <div class="weui-cell__bd">
                        <p>{notempty name="model['mobile'][0]"}<a href="tel:{$model.mobile.0}">{$model.mobile.0}</a>{/notempty}</p>
                    </div>
                </div>
                <div class="weui-cell">
                    <div class="weui-cell__hd"><label class="weui-label">手机号2：</label></div>
                    <div class="weui-cell__bd">
                        <p>{notempty name="model['mobile'][1]"}<a href="tel:{$model.mobile.1}">{$model.mobile.1}</a>{/notempty}</p>
                    </div>
                </div>
                <div class="weui-cell">
                    <div class="weui-cell__hd"><label class="weui-label">手机号3：</label></div>
                    <div class="weui-cell__bd">
                        <p>{notempty name="model['mobile'][2]"}<a href="tel:{$model.mobile.2}">{$model.mobile.2}</a>{/notempty}</p>
                    </div>
                </div>
                <div class="weui-cell">
                    <div class="weui-cell__hd"><label class="weui-label">性别：</label></div>
                    <div class="weui-cell__bd">
                        <p>{:config('app.sex.'.$model['sex'])}</p>
                    </div>
                </div>
                <div class="weui-cell">
                    <div class="weui-cell__hd"><label class="weui-label">身高cm：</label></div>
                    <div class="weui-cell__bd">
                        <p>{$model.stature} cm</p>
                    </div>
                </div>
                <div class="weui-cell">
                    <div class="weui-cell__hd"><label class="weui-label">体重kg：</label></div>
                    <div class="weui-cell__bd">
                        <p>{$model.weight} kg</p>
                    </div>
                </div>
                <div class="weui-cell">
                    <div class="weui-cell__hd"><label class="weui-label">体型：</label></div>
                    <div class="weui-cell__bd">
                        <p>{:config('app.somatotype.'.$model['somatotype'])}</p>
                    </div>
                </div>
                <div class="weui-cell">
                    <div class="weui-cell__hd"><label class="weui-label">婚姻状况：</label></div>
                    <div class="weui-cell__bd">
                        <p>{:config('app.marital_status.'.$model['marital_status'])}</p>
                    </div>
                </div>
                <div class="weui-cell">
                    <div class="weui-cell__hd"><label class="weui-label">出生日期：</label></div>
                    <div class="weui-cell__bd">
                        <p>{$model.birthdate}</p>
                    </div>
                </div>
                <div class="weui-cell">
                    <div class="weui-cell__bd">
                        <div class="letu-box">
                            <div class="letu-box-title">客户关系：</div>
                            <div class="letu-box-body weui-cells_checkbox letu-checkbox">
                                <label class="letu-radio-inline weui-check__label">
                                    <div class="weui-cell__hd">
                                        <i class="weui-icon-checked"></i>
                                    </div>
                                    <div class="weui-cell__bd"><p>{:config('app.customer_relations.'.$model['customer_relations'])}</p></div>
                                </label>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="weui-cell">
                    <div class="weui-cell__hd"><label class="weui-label">客户分类：</label></div>
                    <div class="weui-cell__bd">
                        <p>{:config('app.customer_class.'.$model['customer_class'])}</p>
                    </div>
                </div>
                <div class="weui-cell sel-industry">
                    <div class="weui-cell__hd"><label class="weui-label">所在行业：</label></div>
                    <div class="weui-cell__bd">
                        <span id="industry_id_text">{$model.industry_name}</span>
                    </div>
                    <div class="weui-cell__ft"></div>
                </div>
                <div class="weui-cell sel-position">
                    <div class="weui-cell__hd"><label class="weui-label">职位：</label></div>
                    <div class="weui-cell__bd">
                        <span id="position_id_text">{$model.position_name}</span>
                    </div>
                    <div class="weui-cell__ft"></div>
                </div>
                <div class="weui-cell sel-post">
                    <div class="weui-cell__hd"><label class="weui-label">岗位：</label></div>
                    <div class="weui-cell__bd">
                        <span id="post_id_text">{$model.post_name}</span>
                    </div>
                    <div class="weui-cell__ft"></div>
                </div>
                <div class="weui-cell">
                    <div class="weui-cell__hd"><label class="weui-label">学历：</label></div>
                    <div class="weui-cell__bd">
                        <p>{:config('app.education_id.'.$model['education_id'])}</p>
                    </div>
                </div>
                <div class="weui-cell sel-specialty">
                    <div class="weui-cell__hd"><label class="weui-label">专业：</label></div>
                    <div class="weui-cell__bd">
                        <span id="specialty_id_text">{$model.specialty_name}</span>
                    </div>
                    <div class="weui-cell__ft"></div>
                </div>
                <div class="weui-cell sel-school">
                    <div class="weui-cell__hd"><label class="weui-label">毕业学校：</label></div>
                    <div class="weui-cell__bd">
                        <span id="school_id_text">{$model.school_name}</span>
                    </div>
                    <div class="weui-cell__ft"></div>
                </div>
                <div class="weui-cell sel-birth-area">
                    <div class="weui-cell__hd"><label class="weui-label">出生地区：</label></div>
                    <div class="weui-cell__bd">
                        <span id="birth_area_text">{$model.birth_province_name} {$model.birth_city_name} {$model.birth_region_name}</span>
                    </div>
                    <div class="weui-cell__ft"></div>
                </div>
                <div class="weui-cell">
                    <div class="weui-cell__hd"><label class="weui-label">出生住址：</label></div>
                    <div class="weui-cell__bd">
                        <p>{$model.birth_address}</p>
                    </div>
                </div>
                <div class="weui-cell sel-reside-area">
                    <div class="weui-cell__hd"><label class="weui-label">现居地区：</label></div>
                    <div class="weui-cell__bd">
                        <span id="reside_area_text">{$model.reside_province_name} {$model.reside_city_name} {$model.reside_region_name}</span>
                    </div>
                    <div class="weui-cell__ft"></div>
                </div>
                <div class="weui-cell">
                    <div class="weui-cell__hd"><label class="weui-label">现居住址：</label></div>
                    <div class="weui-cell__bd">
                        <p>{$model.reside_address}</p>
                    </div>
                </div>
                <div class="weui-cell">
                    <div class="weui-cell__hd"><label class="weui-label">企业名称：</label></div>
                    <div class="weui-cell__bd">
                        <p>{$model.company_name}</p>
                    </div>
                </div>
                <div class="weui-cell">
                    <div class="weui-cell__hd"><label class="weui-label">办公地址：</label></div>
                    <div class="weui-cell__bd">
                        <p>{$model.office_address}</p>
                    </div>
                </div>
                <div class="weui-cell">
                    <div class="weui-cell__hd"><label class="weui-label">办公电话：</label></div>
                    <div class="weui-cell__bd">
                        <p>{$model.office_phone}</p>
                    </div>
                </div>
                <div class="weui-cell">
                    <div class="weui-cell__hd"><label class="weui-label">传真号码：</label></div>
                    <div class="weui-cell__bd">
                        <p>{$model.fax}</p>
                    </div>
                </div>
                <div class="weui-cell">
                    <div class="weui-cell__hd"><label class="weui-label">企业网址：</label></div>
                    <div class="weui-cell__bd">
                        <p>{notempty name="model['company_site']"}<a href="{$model.company_site}" target="_blank">{$model.company_site}</a>{/notempty}</p>
                    </div>
                </div>
                <div class="weui-cell">
                    <div class="weui-cell__hd"><label class="weui-label">个人网址：</label></div>
                    <div class="weui-cell__bd">
                        <p>{notempty name="model['person_site']"}<a href="{$model.person_site}" target="_blank">{$model.person_site}</a>{/notempty}</p>
                    </div>
                </div>
                <div class="weui-cell">
                    <div class="weui-cell__hd"><label class="weui-label">企业邮箱：</label></div>
                    <div class="weui-cell__bd">
                        <p>{$model.company_email}</p>
                    </div>
                </div>
                <div class="weui-cell">
                    <div class="weui-cell__hd"><label class="weui-label">个人邮箱：</label></div>
                    <div class="weui-cell__bd">
                        <p>{$model.person_email}</p>
                    </div>
                </div>
                <div class="weui-cell">
                    <div class="weui-cell__bd">
                        <div class="letu-box">
                            <div class="letu-box-title">兴趣爱好：</div>
                            <div class="letu-box-body weui-cells_checkbox letu-checkbox">
                                {volist name="model['hobbies_ids']" id="vo"}
                                <label class="letu-radio-inline weui-check__label">
                                    <div class="weui-cell__hd">
                                        <i class="weui-icon-checked"></i>
                                    </div>
                                    <div class="weui-cell__bd"><p>{:config('app.hobbies_ids.'.$vo)}</p></div>
                                </label>
                                {/volist}
                            </div>
                        </div>
                    </div>
                </div>
                <div class="weui-cell">
                    <div class="weui-cell__bd">
                        <div class="letu-box">
                            <div class="letu-box-title">客户详情：</div>
                            <div class="letu-box-body">
                                <p>{$model.customer_detail}</p>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="weui-btn-area letu-btn-area">
                <button type="button" id="btnDel" class="weui-btn weui-btn_warn" data-href="{:url('del')}" data-id="{:think_encrypt($model.customer_id)}">删除客户信息</button>
            </div>
        </form>
    </div>
</div>
{include file="common:common_js" /}
<script type="text/javascript">
    $(document).ready(function(){
        $(document).on("click", "#btnDel", function() {
            var $element = $(this);
            var data = {};
            data.id = $element.attr('data-id');

            $.confirm("您确定要删除客户信息？", "确认删除?", function() {
                $.ajax({
                    type:'post',
                    url:$element.attr("data-href"),
                    data:data,
                    dataType:'json',
                    success:function(response){
                        if(response.success){
                            if(response.url != ""){
                                setTimeout(function(){
                                    window.location.href = response.url;
                                },2000);
                            }
                            $.toptip(response.msg, 'success');
                        }else{
                            $.toptip(response.msg, 'error');
                        }
                    },
                    error:function(XMLHttpRequest, textStatus, errorThrown){
                    }
                });
            }, function() {
                //取消操作
            });

            return false;
        });
    });
</script>
</body>
</html>